package com.craney.testLoader
{
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.ProgressEvent;
	import flash.net.URLRequest;
	
	public class TestLoaderInfo extends Sprite
	{
		private var myLoader:Loader = new Loader();
		private var myRequest:URLRequest = new URLRequest("girl.jpg");
		
		public function TestLoaderInfo(ps:Sprite)
		{

			myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
			myLoader.load(myRequest);
			
			addChild(myLoader);
			ps.addChild(this);
		}

		private function completeHandler(evt:Event):void
		{
			trace(myLoader.numChildren);
			trace(myLoader.loaderInfo.width);
			trace(myLoader.contentLoaderInfo.width);
			
		}

	}
}